export const TEXT_ZH_MAP = {
  add: '新增',
  'add charts': '新增图表',
  'edit mode': '编辑模式',
  'config charts': '配置图表',
  'remove charts': '移除图表',
  'export data': '导出数据',
  'save dashboard': '保存大盘',
  'dashboard setting': '大盘设置',
  'exit edit mode': '取消编辑',
  save: '保存',
  cancel: '取消',
  edit: '编辑',
  delete: '删除',
  ok: '确认',
  move: '移动',
  'exit fullscreen': '退出全屏',
  fullscreen: '全屏查看',
  export: '导出',
  'export picture': '导出图片',
  'confirm to delete': '确认删除',
  'confirm to remove': '确认移除',
  'parameter configuration': '参数配置',
  'common configuration': '通用项配置',
  'datasource configuration': '数据源配置',
  'controls configuration': '控件配置',
  controls: '控件',
  'field name': '字段名',
  select: '选择框',
  constant: '常量',
  'control data': '控件数据',
  value: '值',
  sort: '结果排序',
  'result limit': '结果截取',
  name: '名称',
  action: '操作',
  'confirm to drop data': '已修改，确认退出编辑？',
  title: '标题',
  'chart title': '图表标题',
  'chart description': '图表描述',
  description: '描述',
  showTotal: '显示总量',
  unit: '显示单位',
  'source data unit config': '源数据单位配置',
  'select chart type': '选择图表类型',
  'chart type': '图表类型',
  'chart label': '图表标签',
  'show chart label': '显示图表标签',
  'connect null': '连接空值',
  'connect null tip': '跳过空值, 连接不为空值的点',
  invalidToZero: '非法值置0',
  'invalid to zero tip': '将非法值如 null, 字符串, 负数展示为0',
  placeholder: '空占位',
  'null display': '空值显示',
  line: '线形图',
  area: '面积图',
  bar: '柱状图',
  pie: '饼图',
  table: '表格',
  metric: '指标',
  'metric aggregation': '指标聚合',
  'metric filter': '指标过滤',
  'failed to get data': '数据获取失败',
  loading: '加载中',
  'show mock data': '模拟数据展示',
  'no chart data': '页面为空,没有图表数据',
  'exporting picture': '正在导出图片...',
  'exporting data': '正在导出数据...',
  'export data error': '导出数据失败！',
  'unnamed dashboard': '未命名大盘',
  'no data': '暂无数据',
  dsl: 'DSL',
  'metrics group': '指标分组',
  'empty metric group tip': '请先选择指标分组！',
  'configuration mode': '配置模式',
  time: '时间',
  'select time': '选择时间',
  'custom time metric': '自定义时间指标',
  'custom time interval': '自定义时间间隔',
  'fixed time range': '固定图表时间范围',
  expr: '表达式',
  'unnamed chart': '未命名图表',
  'expr input': '表达式录入',
  'please complete': '请补全',
  'please complete data': '请补全数据',
  'add metric': '添加指标',
  'add value': '添加值',
  'add filter': '添加筛选器',
  'add sort': '添加排序',
  dimensions: '维度',
  alias: '别名',
  'alias input': '别名录入',
  'required item': '必填项',
  'uncompleted input': '请完成必填项！',
  'field config': '字段配置',
  'filter config': '过滤器配置',
  'time config': '时间配置',
  'time format': '时间格式',
  second: '秒',
  minute: '分',
  hour: '时',
  day: '天',
  week: '周',
  month: '月',
  '5min': '5 分钟',
  '30min': '30 分钟',
  '1hour': '1 小时',
  '3hour': '3 小时',
  today: '今天',
  yesterday: '昨天',
  'this week': '本周',
  'last week': '上周',
  'this month': '本月',
  'last month': '上月',
  'this year': '今年',
  'last year': '去年',
  'result filter': '结果筛选器',
  'valueDimensions info': '除表格外，其他图表所选值需保证返回值为数值类型！',
  'typeDimensions info': '选择多个维度时，时间必选，其他维度自动分组',
  'null display tip': '指定数据为空时显示的值，默认为 --',
  'config err': '配置数据有误，请补全配置！',
  custom: '自定义',
  'number conversion': '数值转换',
  'time unit': '时间单位',
  'traffic unit': '速率单位',
  'capacity unit': '容量单位',
  percent: '百分比',
  'input custom unit': '输入自定义单位',
  'select base unit': '选择返回值单位',
  null: '无',
  'sort method': '排序方式',
  desc: '降序',
  asc: '升序',
  'global filter': '全局筛选器',
  'filter items': '筛选项',
  enabled: '启用',
  disabled: '禁用',
  input: '输入框',
  'input keywords': '输入关键字',
  'select datasource': '选择数据源',
  'define constant': '指定固定值',
  'table row click': '表格行点击',
  'event name': '事件名',
  'event value': '事件传递值',
  copy: '复制',
  succeed: '成功',
  failed: '失败',
  'start time': '开始时间',
  'end time': '结束时间',
};

export const TEXT_EN_MAP = {
  add: 'add',
  'add charts': 'add charts',
  'edit mode': 'edit mode',
  'config charts': 'config charts',
  'remove charts': 'remove charts',
  'export data': 'export as excel',
  'save dashboard': 'save dashboard',
  'dashboard setting': 'dashboard setting',
  'exit edit mode': 'exit edit mode',
  save: 'save',
  cancel: 'cancel',
  edit: 'edit',
  delete: 'delete',
  ok: 'ok',
  move: 'move',
  'exit fullscreen': 'exit fullscreen',
  fullscreen: 'fullscreen',
  export: 'export',
  'export picture': 'export picture',
  'confirm to delete': 'confirm to delete',
  'confirm to remove': 'confirm to remove',
  'parameter configuration': 'parameter configuration',
  'common configuration': 'common configuration',
  'datasource configuration': 'datasource configuration',
  'controls configuration': 'controls configuration',
  controls: 'controls',
  'field name': 'field name',
  select: 'select',
  constant: 'constant',
  'control data': 'control data',
  value: 'value',
  sort: 'sort',
  'result limit': 'result limit',
  name: 'name',
  action: 'action',
  'confirm to drop data': 'Modified, confirm to exit edit mode',
  title: 'title',
  'chart title': 'chart title',
  'chart description': 'chart description',
  description: 'description',
  showTotal: 'show total num',
  unit: 'unit',
  'source data unit config': 'source data unit config',
  'select chart type': 'select chart type',
  'chart type': 'chart type',
  'chart label': 'chart label',
  'show chart label': 'show chart label',
  'null display': 'null display',
  'connect null': 'connect null value',
  'connect null tip': 'skip null values and join points that are not null',
  invalidToZero: 'show invalid value as zero',
  'invalid to zero tip': 'show invalid value such as null, string, negative number as zero',
  placeholder: 'placeholder',
  line: 'line',
  area: 'area',
  bar: 'bar',
  pie: 'pie',
  table: 'table',
  metric: 'metric',
  'metric aggregation': 'metric aggregation',
  'metric filter': 'metric filter',
  'failed to get data': 'failed to get data',
  loading: 'loading',
  'show mock data': 'show mock data',
  'no chart data': 'no chart data',
  'exporting picture': 'exporting picture...',
  'exporting data': 'exporting data...',
  'export data error': 'export data error!',
  'no data': 'no data',
  dsl: 'DSL',
  'metrics group': 'metrics group',
  'empty metric group tip': 'Please select metric group first!',
  'configuration mode': 'configuration mode',
  time: 'time',
  'select time': 'select time',
  'custom time metric': 'custom time metric',
  'custom time interval': 'custom time interval',
  'fixed time range': 'fixed time range',
  expr: 'expression',
  'expr input': 'expression input',
  'please complete': 'please complete',
  'please complete data': 'please complete data',
  'add metric': 'add metric',
  'add value': 'add value',
  'add filter': 'add filter',
  'add sort': 'add sort',
  dimensions: 'dimensions',
  alias: 'alias',
  'alias input': 'alias input',
  'uncompleted input': 'Please complete the required fields!',
  'required item': 'required item',
  'field config': 'field config',
  'filter config': 'filter config',
  'time config': 'time config',
  'time format': 'time format',
  second: 'second',
  minute: 'minute',
  hour: 'hour',
  day: 'day',
  week: 'week',
  month: 'month',
  '5min': '5 min',
  '30min': '30 min',
  '1hour': '1 hour',
  '3hour': '3 hour',
  today: 'today',
  yesterday: 'yesterday',
  'this week': 'this week',
  'last week': 'last week',
  'this month': 'this month',
  'last month': 'last month',
  'this year': 'this year',
  'last year': 'last year',
  'result filter': 'result filter',
  'valueDimensions info': 'Except for the table, the selected value of other charts must ensure that the return value is numeric!',
  'typeDimensions info': 'When selecting multiple dimensions, time must be selected, other dimensions are automatically grouped',
  'null display tip': 'Specify the value displayed when the data is empty, the default is --',
  'config err': 'The configuration data is incorrect, please complete the configuration!',
  'number conversion': 'number conversion',
  'time unit': 'time unit',
  'traffic unit': 'traffic unit',
  'capacity unit': 'capacity unit',
  percent: 'percent',
  custom: 'custom',
  'input custom unit': 'input custom unit',
  'select base unit': 'select base unit',
  null: 'nothing',
  'sort method': 'sort method',
  desc: 'DESC',
  asc: 'ASC',
  'global filter': 'global filter',
  'filter items': 'filter items',
  enabled: 'enabled',
  disabled: 'disabled',
  input: 'input',
  'input keywords': 'input keywords',
  'select datasource': 'select datasource',
  'define constant': 'define constant',
  'table row click': 'table row click',
  'event name': 'event name',
  'event value': 'event value',
  'unnamed chart': 'unnamed chart',
  copy: 'copy',
  succeed: 'succeed',
  failed: 'failed',
  'start time': 'start time',
  'end time': 'end time',
};

export const DEFAULT_VIEW_CONFIG = {
  description: '',
  hideHeader: true,
  hideReload: true,
  dataSourceType: 'api',
  title: '未命名图表',
  api: {},
};

export const CHARTS_INIT_CONFIG = {
  'chart:line': {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'chart:line',
    title: 'Line Chart',
    config: {
      optionProps: {
        noAreaColor: true,
      },
    },
  },
  'chart:area': {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'chart:area',
    title: 'Area Chart',
  },
  'chart:bar': {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'chart:bar',
    title: 'Bar Chart',
  },
  'chart:pie': {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'chart:pie',
    title: 'Pie Chart',
  },
  'chart:funnel': {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'chart:funnel',
    title: 'Funnel Chart',
  },
  'chart:map': {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'chart:map',
    title: 'Map Chart',
    staticData: {
      metricData: [{}],
    },
  },
  card: {
    ...DEFAULT_VIEW_CONFIG,
    title: 'Number Card',
    chartType: 'card',
    config: {},
  },
  table: {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'table',
    title: 'Table',
    config: {
      optionProps: {
        isMoreThanOneDay: true,
        moreThanOneDayFormat: 'M/D',
      },
    },
  },
  'chart:scatter': {
    ...DEFAULT_VIEW_CONFIG,
    chartType: 'chart:scatter',
    title: 'Scatter Chart',
  },
};

export const GRID_LAYOUT_CONFIG = {
  cols: 24,
  rowHeight: 30,
};
